#include <iostream>

using namespace std;


int main(int argc, char * argv[])
{
    long rows=atol(argv[1]);
	long cols=atol(argv[2]);
	
	cout <<rows <<"  "  <<cols;
	
	for(long i=0;i<rows;++i)
	{
	    cout <<"\n";
	    for(long j=0;j<cols;++j)
		{
		    if(i<j)
			    cout << i+j <<"  ";    
			else
			    cout <<0 <<"  ";
		}
	}
	
	return 0;
}


